package utils;

import java.io.File;
import java.io.IOException;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.opera.OperaDriver;
import org.testng.annotations.Test;

public class webdriver_do {

	public WebDriver wd;
	
	

	@Test
		public void init_webdriver() throws IOException {
			
	
			/*String driverPath=new File("./").getCanonicalPath()+"/src/driver/chromedriver.exe";
			String driverName="webdriver.chrome.driver";*/
			
		
		

		String driverPath=new File("./").getCanonicalPath()+"/src/driver/operadriver.exe";
		String driverName="webdriver.opera.driver";
		
			System.setProperty(driverName, driverPath);
			
			/*wd=new ChromeDriver();*/
			
			wd=new OperaDriver();
			
			wd.manage().window().maximize();
			
			wd.get("https://testerhome.com");
			
			System.err.println("-----webdriver初始化完毕！！！----\n");
		
			}



	}
		
	
	

	
